home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / WASTE 1.0a4 Distribution / Interfaces 2 / ExternQD.p < prev    next >
Text File  |  1994-02-02  |  650b  |  34 lines

  1. unit ExternQD;
  2.  
  3. { The easy way to get QuickDraw globals from a code resource }
  4.  
  5. interface
  6.  
  7.     type
  8.  
  9.         QDGlobals = record
  10.                 randSeed: LongInt;
  11.                 screenBits: BitMap;
  12.                 arrow: Cursor;
  13.                 dkGray: Pattern;
  14.                 ltGray: Pattern;
  15.                 gray: Pattern;
  16.                 black: Pattern;
  17.                 white: Pattern;
  18.                 thePort: GrafPtr;
  19.             end;  { QDGlobals }
  20.         QDPtr = ^QDGlobals;
  21.  
  22.     const
  23.  
  24.         QDGlobalsSize = SizeOf(QDGlobals);
  25.         QDGlobalsOffset = -QDGlobalsSize + SizeOf(GrafPtr);
  26.  
  27.     function GetQDGlobals: QDPtr;
  28.     inline
  29.         $2055,                                        { movea.l (a5), a0 }
  30.         $41E8, QDGlobalsOffset,            { lea QDGlobalsOffset(a0), a0 }
  31.         $2E88;                                        { move.l a0, (sp) }
  32.  
  33. implementation
  34. end.